import Vue from 'vue';
import VueRouter from 'vue-router'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-default/index.css';
import App from './App.vue';
import Home from './components/Home.vue';
import SortView from './components/SortView.vue';
import SpView from './components/SpView.vue';
import MoviePageView from './components/MoviePageView.vue';
Vue.use(ElementUI);
Vue.use(VueRouter);

const router = new VueRouter({
    routes: [
        {
            path: '/', component: App ,
            children :[
                { path :"" , component: Home },
                { path :"/sort/:tid/:sortname/:page/:pagesize" ,component:SortView},
                { path :"/sp/:season_id" ,component:SpView},
                { path :"/movie/:aid/:page" ,component:MoviePageView},
                { path :"/movie/:aid" ,component:MoviePageView}

            ]

        }
    ]
})

const app = new Vue({
    router
}).$mount('#app')